package com.pk.platform.business.common.web;

import com.pk.platform.business.common.service.IKindergartenService;
import com.pk.platform.business.common.vo.KinderVO;
import com.pk.platform.business.core.web.GenericAction;
import com.pk.platform.domain.common.Kindergarten;

public class KindergartenAction extends GenericAction {

	private Kindergarten kindergarten = new Kindergarten();
	
	private KinderVO kvo = new KinderVO();
	
	private IKindergartenService kindergartenService;
	
	private boolean delFlag = false;
	
	public String kindergartenManage()
	{
		lp = kindergartenService.queryKindergarten(kvo, pager);
		return SUCCESS;
	}

	public String toAddKindergarten()
	{
		return SUCCESS;
	}
	
	public String addKindergarten()
	{
		kindergarten.setIsDel(0);
		kindergartenService.addKindergarten(kindergarten);
		return SUCCESS;
	}
	
	public String toUpdateKindergarten()
	{
		kindergarten = kindergartenService.queryKindergartenById(kindergarten.getId());
		return SUCCESS;
	}
	
	public String updateKindergarten()
	{
		kindergartenService.updateKindergarten(kindergarten);
		return SUCCESS;
	}
	
	public String delKindergarten()
	{
		message = kindergartenService.delKindergarten(kindergarten.getId());
		return SUCCESS;
	}

	public Kindergarten getKindergarten() {
		return kindergarten;
	}

	public void setKindergarten(Kindergarten kindergarten) {
		this.kindergarten = kindergarten;
	}

	public KinderVO getKvo() {
		return kvo;
	}

	public void setKvo(KinderVO kvo) {
		this.kvo = kvo;
	}

	public IKindergartenService getKindergartenService() {
		return kindergartenService;
	}

	public void setKindergartenService(IKindergartenService kindergartenService) {
		this.kindergartenService = kindergartenService;
	}

	public boolean isDelFlag() {
		return delFlag;
	}

	public void setDelFlag(boolean delFlag) {
		this.delFlag = delFlag;
	}
	
}
